package com.hspjava.stringbuffer_;

import java.util.Scanner;

public class StringBufferExercise02 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String price = scanner.next();
        StringBuffer sb = new StringBuffer(price);

        //33334324.342
        for (int i = price.lastIndexOf('.') - 3; i > 0; i -= 3) {
            sb.insert(i, ',');
        }

        System.out.println(sb);
    }
}
